#include <iostream>
#include <JXQCore/JVariant>
#include <JXQCore/JDebug>

using namespace JXQ;

struct A
{
public:
	int i;
	float j;
	JString str;
};

int main(int argc, char *argv[])
{
	J_UNUSED(argc);
	J_UNUSED(argv);

	JVariant var1 = 123;
	jDebug() << var1;

	JVariant var2 = "321";
	jDebug() << var2;

	JVariant var3 = 3.142;
	jDebug() << var3;

	var1 = "hello";
	jDebug() << var1;

	var2 = 3.142f;
	jDebug() << var2;

	var3 = 'C';
	jDebug() << var3;

	var3 = L'C';
	jDebug() << var3;

	var1 = A{22, 3.14, "yes"};
	A a = var1.value<A>();
	jDebug() << a.i << a.j << a.str << var1.toInt();

	var2 = 255L;
	jDebug() << var2.toString();

	var2 = "-65535";
	jDebug() << var2.toInt();

	var3 = L"wchar_t";
	jDebug() << var3;

	return 0;
}
